package com.demo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.demo.core.domain.Result;
import com.demo.domain.Like;
import com.demo.core.exception.ParameterException;
import com.demo.domain.ro.LikeRequest;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;

@Transactional
public interface LikeService extends IService<Like> {

    Result like(LikeRequest likeRequest,Long uid) throws IOException, ParameterException;

    /**
     * 取消点赞
     * @param uid
     * @param objType
     * @param objId
     * @param like
     * @return
     */
    boolean cancelLike(Long uid, int objType, Long objId, Like like) throws ParameterException;

    /**
     * 点赞
     * @param uid
     * @param objType
     * @param objId
     * @return
     */
    boolean like(Long uid, int objType, Long objId,String unickname) throws ParameterException ;

}
